home *** CD-ROM | disk | FTP | other *** search
/ SGI Varsity Update 1998 August / SGI Varsity Update 1998 August.iso / dist / patchSG0002824.idb / usr / include / sys / uuid.h.z / uuid.h
C/C++ Source or Header  |  1998-07-29  |  2KB  |  54 lines

  1. #ifndef _SYS_UUID_H
  2. #define _SYS_UUID_H
  3.  
  4. /**************************************************************************
  5.  *                                                                        *
  6.  *                Copyright (C) 1994, Silicon Graphics, Inc.              *
  7.  *                                                                        *
  8.  *  These coded instructions, statements, and computer programs  contain  *
  9.  *  unpublished  proprietary  information of Silicon Graphics, Inc., and  *
  10.  *  are protected by Federal copyright law.  They  may  not be disclosed  *
  11.  *  to  third  parties  or copied or duplicated in any form, in whole or  *
  12.  *  in part, without the prior written consent of Silicon Graphics, Inc.  *
  13.  *                                                                        *
  14.  **************************************************************************/
  15. #ident "$Revision: 1.7 $"
  16.  
  17. /* Universally Unique Identifiers */
  18.  
  19. typedef struct {
  20.         unsigned char    __u_bits[16];
  21. } uuid_t, *uuid_p_t;
  22.  
  23. void    uuid_create    (uuid_t *uuid,            uint_t *status);
  24. void    uuid_create_nil    (uuid_t *uuid,            uint_t *status);
  25. boolean_t uuid_is_nil    (uuid_t *uuid,            uint_t *status);
  26. boolean_t uuid_equal    (uuid_t *uuid1, uuid_t *uuid2,    uint_t *status); 
  27. int    uuid_compare    (uuid_t *uuid1, uuid_t *uuid2,    uint_t *status);
  28. void    uuid_to_string    (uuid_t *uuid, char **uuid_str,    uint_t *status);
  29. void    uuid_from_string (char *uuid_str, uuid_t *uuid,    uint_t *status);
  30. ushort_t uuid_hash    (uuid_t *uuid,            uint_t *status);
  31. __uint64_t uuid_hash64    (uuid_t *uuid,            uint_t *status);
  32.  
  33. #ifdef _KERNEL
  34. void    uuid_getnodeuniq (uuid_t *uuid, int fsid [2]);
  35. #endif    /* _KERNEL */
  36.  
  37.  
  38. /*
  39.  *  Values to be returned in the "status" parameter.
  40.  */
  41.  
  42. #define    uuid_s_ok            0
  43. #define uuid_s_bad_version        382312584
  44. #define    uuid_s_socket_failure        382312585
  45. #define    uuid_s_getconf_failure        382312586
  46. #define    uuid_s_no_address        382312587
  47. #define    uuid_s_overrun            382312588
  48. #define    uuid_s_internal_error        382312589
  49. #define    uuid_s_coding_error        382312590
  50. #define    uuid_s_invalid_string_uuid    382312591
  51. #define uuid_s_no_memory        382312592
  52.  
  53. #endif /* _SYS_UUID_H */
  54.